package com.ls.controller.customer.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import static com.ls.constant.SystemConstants.NUMBER_1;


/**
 * @ClassName AddUserModel
 * @Description APP用户注册model
 * @Author pengyu
 * @Date 2024/6/27 17:14
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UpdateCustomerModel {

    /**
     * 昵称
     */
    @NotBlank(message = "昵称不得为空")
    private String nickname;

    /**
     * 格式 YYYY-MM-DD HH:mm:ss
     */
    @NotBlank(message = "生日不得为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private String birthday;
    /*生日类型 0为农历，1为阳历*/
    @NotNull(message = "生日类型不得为空")
    @Max(value = 1)
    @Min(value = 0)
    private Integer birthdayType=NUMBER_1;

    /**
     * 性别 1 男 2 女 3 未知
     */
    @NotNull(message = "性别不得为空。值在1-3之间")
    @Max(value = 3)
    @Min(value = 1)
    private Integer sex;

    /**
     * 头像
     */
    @NotBlank(message = "头像不得为空")
    private String avatar;

}
